<!DOCTYPE html>
<html>
<head>
    <title>会员表</title>
		<#include "/header.html">
    <style>
        /*html{
            height: 100%;
        }*/
        body{
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: url(${request.contextPath}/statics/maintain_bottom.png) no-repeat center bottom;
            background-size: 100% auto;
        }
    </style>

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <div class="form-group col-sm-2" style="width: 330px;padding-right: 0px">
                <label>会员名称：</label>
                <div id="memberNameDiv" class="btn-group">
                    <input id="memberName" type="text" placeholder="会员名称" class="form-control">
                </div>
            </div>
            <div class="form-group col-sm-2" style="width: 240px;padding-left: 0px" >
                <!-- <input type="text" class="form-control" v-model="q.username" @keyup.enter="query" placeholder="用户名">-->
                    <label>会员类型：</label>
                    <div id="addgroup" class="btn-group">
                        <div class="btn-group">
                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="">
                                <span class="buttonText"><span id="dropdownMenu2">全部会员信息</span></span>
                                <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" role="menu">
                                <li>
                                    <a href="#" onclick="shows1($(this).text())">全部会员信息</a>
                                </li>
                                <li>
                                    <a href="#" onclick="shows1($(this).text())">游客</a>
                                </li>
                                <li>
                                    <a href="#" onclick="shows1($(this).text())">普通会员</a>
                                </li>
                                <li>
                                    <a href="#" onclick="shows1($(this).text())">认证会员</a>
                                </li>
                            </ul>
                        </div>
                    </div>
            </div>
            <a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("sys:tcmember:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("sys:tcmember:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("sys:tcmember:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
            <#if shiro.hasPermission("sys:tcmember:apply")>
                <a class="btn btn-primary" @click="apl"><i class="glyphicon glyphicon-asterisk"></i>&nbsp;认证</a>
            </#if>
            <#if shiro.hasPermission("sys:tcmember:output")>
            <a class="btn btn-primary" @click="out"><i class="glyphicon glyphicon-asterisk"></i>&nbsp;导出</a>
            </#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal layui-form">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员电话</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.phone" placeholder="电话"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员真实姓名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.realName" placeholder="用户真实姓名"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员性别 </div>
                        <div class="col-sm-10">
                            <!--<input type="text" class="form-control" v-model="tcMember.memberSex" placeholder="会员性别 MALE:男,FEMALE:女"/>-->
                                <div class="btn-group">
                                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="">
                                        <span class="buttonText"><span id="dropdownMenu" v-model="tcMember.memberSex">男</span></span>
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu" role="menu">
                                        <li>
                                            <a href="#" onclick="shows($(this).text())" >男</a>
                                        </li>
                                        <li>
                                            <a href="#" onclick="shows($(this).text())" >女</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员EMAIL</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.memberEmail" placeholder="会员EMAIL"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员类型</div>
                            <!--<input type="text" class="form-control" v-model="tcMember.memberType" placeholder="会员类型 GUEST:游客（允许授权）;REGULAR_MEMBER:普通会员;VERIFIED_MEMBER:认证会员;；DUTY_MANAGER:值班经理;"/>-->
                            <div class="btn-group">
                                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="">
                                    <span class="buttonText"><span id="dropdownMenu3" v-model="tcMember.memberType">游客</span></span>
                                    <span class="caret"></span>
                                </button>
                                <ul id="memberType" class="dropdown-menu" role="menu">
                                    <li>
                                        <a href="#" onclick="shows3($(this).text())">游客</a>
                                    </li>
                                    <li>
                                        <a href="#" onclick="shows3($(this).text())">普通会员</a>
                                    </li>
                                    <!--<li  disabled="">
                                        <a  href="#" onclick="shows3($(this).text())">认证会员</a>
                                    </li>-->
                                </ul>
                            </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">推荐会员编号</div>
                        <div class="col-sm-10">
                            <input id="recommendMemberNo" type="text" class="form-control" v-model="tcMember.recommendMemberNo" placeholder="推荐会员编号" readonly="readonly" style="cursor: pointer;" @click="showMemberPage"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员语言</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.memberLanguage" placeholder="用户语言（需授权获得）"/>
                        </div>
                    </div>

											                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员总积分值</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.totalIntegral" placeholder="会员总积分值"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">会员总府宝值</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.totalCredit" placeholder="会员总府宝值"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">国家</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.country" placeholder="国家"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">省</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.province" placeholder="省"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">城市</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.city" placeholder="城市"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">工作单位</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.company" placeholder="工作单位"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">备注</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="tcMember.remark" placeholder="备注"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/tcmember.js?_${.now?long}"></script>
<script>
    function shows1(a) {
        if (a == "全部会员信息") {
            $("#dropdownMenu2").text("全部会员信息");
        } else if (a == "游客") {
            $("#dropdownMenu2").text("游客");
        } else if (a == "普通会员") {
            $("#dropdownMenu2").text("普通会员");
        }else {
            $("#dropdownMenu2").text("认证会员");
        }
    }

    function shows(a) {
        if (a == "男") {
            $("#dropdownMenu").text("男");
        } else {
            $("#dropdownMenu").text("女");
        }
    }

    function shows3(a){
        if (a == "游客") {
            $("#dropdownMenu3").text("游客");
        } else {
            $("#dropdownMenu3").text("普通会员");
        }
    }
</script>
<script src="${request.contextPath}/statics/js/layui.js"></script>
</body>
</html>